package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallActivityGoods;
import com.appkubes.mall.core.po.MallActivityGoodsExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallActivityGoodsMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_goods
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallActivityGoodsSqlProvider.class, method="countByExample")
    long countByExample(MallActivityGoodsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_goods
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallActivityGoodsSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallActivityGoodsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_goods
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_activity_goods",
        "where activity_goods_key = #{activityGoodsKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String activityGoodsKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_goods
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_activity_goods (activity_goods_key, app_key, ",
        "activity_key, goods_key, ",
        "brokerage_rate, brokerage_amount)",
        "values (#{activityGoodsKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{activityKey,jdbcType=VARCHAR}, #{goodsKey,jdbcType=VARCHAR}, ",
        "#{brokerageRate,jdbcType=DECIMAL}, #{brokerageAmount,jdbcType=DECIMAL})"
    })
    int insert(MallActivityGoods record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_goods
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallActivityGoodsSqlProvider.class, method="insertSelective")
    int insertSelective(MallActivityGoods record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_goods
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallActivityGoodsSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="activity_goods_key", property="activityGoodsKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="activity_key", property="activityKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_key", property="goodsKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="brokerage_rate", property="brokerageRate", jdbcType=JdbcType.DECIMAL),
        @Result(column="brokerage_amount", property="brokerageAmount", jdbcType=JdbcType.DECIMAL)
    })
    List<MallActivityGoods> selectByExampleWithRowbounds(MallActivityGoodsExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_goods
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallActivityGoodsSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="activity_goods_key", property="activityGoodsKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="activity_key", property="activityKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_key", property="goodsKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="brokerage_rate", property="brokerageRate", jdbcType=JdbcType.DECIMAL),
        @Result(column="brokerage_amount", property="brokerageAmount", jdbcType=JdbcType.DECIMAL)
    })
    List<MallActivityGoods> selectByExample(MallActivityGoodsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_goods
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "activity_goods_key, app_key, activity_key, goods_key, brokerage_rate, brokerage_amount",
        "from mall_activity_goods",
        "where activity_goods_key = #{activityGoodsKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="activity_goods_key", property="activityGoodsKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="activity_key", property="activityKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_key", property="goodsKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="brokerage_rate", property="brokerageRate", jdbcType=JdbcType.DECIMAL),
        @Result(column="brokerage_amount", property="brokerageAmount", jdbcType=JdbcType.DECIMAL)
    })
    MallActivityGoods selectByPrimaryKey(String activityGoodsKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_goods
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallActivityGoodsSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallActivityGoods record, @Param("example") MallActivityGoodsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_goods
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallActivityGoodsSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallActivityGoods record, @Param("example") MallActivityGoodsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_goods
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallActivityGoodsSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallActivityGoods record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_activity_goods
     *
     * @mbg.generated
     */
    @Update({
        "update mall_activity_goods",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "activity_key = #{activityKey,jdbcType=VARCHAR},",
          "goods_key = #{goodsKey,jdbcType=VARCHAR},",
          "brokerage_rate = #{brokerageRate,jdbcType=DECIMAL},",
          "brokerage_amount = #{brokerageAmount,jdbcType=DECIMAL}",
        "where activity_goods_key = #{activityGoodsKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallActivityGoods record);
}